package com.yf.tz.dao;

import com.yf.dao.BaseDao;
import com.yf.tz.entity.MallOrderEntity;
import com.yf.tz.vo.MallOrderVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 订单Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Wed Jul 01 16:32:18 CST 2020
 */
@Mapper
public interface MallOrderDao extends BaseDao<MallOrderEntity> {


    List<MallOrderVo> queryListVo(MallOrderVo mallOrderVo);

    MallOrderVo getVo(Long id);

    List<MallOrderVo> findByUserId(@Param("userId") Long userId, @Param("paid") Integer paid, @Param("status") Integer status);

    //订单状态
    List<MallOrderVo> findByStatusAndPaid(@Param("status") Integer status, @Param("paid") Integer paid);

    //重制配货
    void resetWaitSend(@Param("status1") Integer status1,@Param("status2") Integer status2);

    //配货
   void waitSend(@Param("ids") List<Long> ids, @Param("status") Integer status);

    MallOrderEntity findByOrderNo(String orderNo);

    List<MallOrderEntity> findBeforeTimeAndPaidAndStatus(@Param("time") Date time, @Param("paid") Integer paid,Integer status);
}
